package dao;

import entity.Account;

/**
 * @program: FinalExam
 * @description:
 * @create: 2021-12-14 17:11
 * @Date 2021/12/14
 **/

public interface AccountDao {
    /**
     * 根据id查询用户的余额
     * @param id
     * @return
     */
    public Account  QueryMyBalance(String user_id);

    /**
     * 根据卡号转账
     * @param money
     * @param username
     * @return
     */
    public Boolean transferAccountsNyUsername(Double money, String username);

    /**
     * 根据用户id进行取款
     * @param id
     * @param money
     * @return
     */
    public Boolean withdrawalById(String id ,Double money);

    /**
     * 根据账户id 和 uid 进行查找
     * @param accountId
     * @param
     * @return
     */
    Account findByAccountId(String accountId);

    Boolean addAccount(String accountId, String gmt_create, String id);

    Account QueryMyBalanceByUsername(String toUsername);

    void saveMoney(Double money,String u_id);

    void deleteAccount(String user_id,String gmt_modify);

    //public Account queryBy

}
